package com.nj.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("b_recharge_record")
@Accessors(chain = true)
public class Recharge {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer uid;
    @TableField("recharge_no")
    private String rechargeNo;
    @TableField("recharge_status")
    private Integer rechargeStatus;
    @TableField("recharge_money")
    private BigDecimal rechargeMoney;
    @TableField(value = "recharge_time",fill = FieldFill.INSERT)
    @JsonSerialize(using = LocalDateTimeSerializer.class)//序列化器
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)//反序列化器
    private LocalDateTime rechargeTime;
    @TableField("recharge_desc")
    private String rechargeDesc;
    private String channel;

}
